<?php defined('IN_ADMIN') or exit('Access Denied!'); ?>

<form action="/admin/hotel_hall/save/<?=intval($shop_id);?>" method="post" id="myform">
  <input type="hidden" name="method" value="<?=$method;?>" />
  <input type="hidden" name="hall_id" value="<?=i($data['hall_id']);?>" />
  <input type="hidden" name="ordnum" value="<?=i($data['ordnum']);?>" />
  <div class="pad-10">
    <div class="col-tab">
      <ul class="tabBut cu-li" id="tab_setting">
        <li id="tab_setting_1" class="on">基本信息</li>
      </ul>
      <div id="show_div_1" class="content pad-10">
        <table width="100%" id="customize_config" class="table_form">
          <tbody id="customize_config_0">
            <tr>
              <td width="100">名称：</td>
              <td class="y-bg"><input type="text" class="input-text" name="name" id="name" size="50" value="<?=h($data['name']);?>"/></td>
            </tr>
          <tr>
            <td width="100">封面图像：</td>
            <td class="y-bg"><img width="220" height="150" id="picshow" src="<?=thumb_url($data['picture'], 220, 150);?>" style="border:1px #ccc solid;margin-bottom:8px" />
            <br />
            <select name="picture" id="picture">
                <option value="">选择图像 ...</option>
                <?=View::groupOptions($albums, $data['picture']); ?>
            </select>
            </td>
          </tr>
            <tr>
              <td width="100">所在楼层：</td>
              <td class="y-bg"><input type="text" class="input-text" name="floor" id="floor" size="30" value="<?=i($data['floor']);?>"/>
                &nbsp;&nbsp;&nbsp;&nbsp;<font color="gray">F</font></td>
            </tr>
            <tr>
              <td width="100">桌数：</td>
              <td class="y-bg"><input type="text" class="input-text" name="table" id="table" size="30" value="<?=i($data['table']);?>"/>
                &nbsp;&nbsp;&nbsp;&nbsp;<font color="gray">桌</font></td>
            </tr>
            <tr>
              <td width="100">厅高：</td>
              <td class="y-bg"><input type="text" class="input-text" name="height" id="height" size="30" value="<?=h($data['height']);?>"/>
                &nbsp;&nbsp;&nbsp;&nbsp;<font color="gray">米</font></td>
            </tr>
            <tr>
              <td width="100">形状：</td>
              <td class="y-bg"><input type="text" class="input-text" name="shape" id="shape" size="30" value="<?=h($data['shape']);?>"/></td>
            </tr>
            <tr>
              <td width="100">面积：</td>
              <td class="y-bg"><input type="text" class="input-text" name="square" id="square" size="30" value="<?=h($data['square']);?>"/>
                &nbsp;&nbsp;&nbsp;&nbsp;<font color="gray">㎡</font></td>
            </tr>
            <tr>
              <td width="100">其他说明：</td>
              <td><textarea id="description" name="description" cols="50" rows="4"><?=h($data['description']);?></textarea>
              <br />其他描述信息</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="bk15"></div>
      <input name="dosubmit" id="dosubmit" type="submit" value="提交" class="dialog">
    </div>
  </div>
</form>
<script type="text/javascript" language="javascript" src="<?=STATIC_URL;?>js/ajaxupload.min.js"></script>
<script type="text/javascript">
var info_description = "如：容纳人数：xxx人；最低消费：xxx元/人；可承接自助等详细信息...";
$(document).ready(function(){
    $("#myform").submit(function(){
        if($("#description").val().trim() == info_description){
            $("#description").val('');
        }
    });
    if($("#description").val().trim() == ""){
        $("#description").val(info_description).css('color', 'grey');
    }
    $("#description").click(function(){
        if($("#description").val().trim() == info_description){
            $("#description").val('').css('color', '');
        }
    }).blur(function(){
        if($("#description").val().trim() == ''){
            $("#description").val(info_description).css('color', 'grey');
        }
    });

    $("#picture").change(function(){
        $("#picshow").attr('src', '/admin/attach/thumb?picture=' + this.value + '&width=220&height=150');
    });

    $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
    $("#name").formValidator({onshow:"请输入宴会厅名称",onfocus:"请输入宴会厅名称"}).inputValidator({min:1,onerror:"宴会厅名称没有填写"});
});
</script>